import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:library_base/res/colors.dart';
import 'package:library_base/res/dimens.dart';

/// 间隔
/// 官方做法：https://github.com/flutter/flutter/pull/54394
class Gaps {
  /// 水平间隔
  static const Widget hGap3 = SizedBox(width: Dimens.gap_dp3);
  static const Widget hGap4 = SizedBox(width: Dimens.gap_dp4);
  static Widget hGap5 = SizedBox(width: Dimens.gap_dp5);
  static const Widget hGap8 = SizedBox(width: Dimens.gap_dp8);
  static const Widget hGap10 = SizedBox(width: Dimens.gap_dp10);
  static const Widget hGap12 = SizedBox(width: Dimens.gap_dp12);
  static const Widget hGap15 = SizedBox(width: Dimens.gap_dp15);

  static Widget hGap18 = SizedBox(width: Dimens.gap_dp_w_18);
  static Widget hGap20 = SizedBox(width: Dimens.gap_dp20);

  static Widget hGap25 = SizedBox(width: Dimens.gap_dp25);

  ///左右间距
  static Widget hGap24 = SizedBox(width: 24.w);
  static Widget hGap16 = SizedBox(width: 16.w);
  static Widget vhGap36 = SizedBox(height: 36.w);

  static const Widget hGap32 = SizedBox(width: Dimens.gap_dp32);

  /// 垂直间隔
  static const Widget vGap3 = SizedBox(height: Dimens.gap_dp3);
  static const Widget vGap4 = SizedBox(height: Dimens.gap_dp4);
  static Widget vGap5 = SizedBox(height: Dimens.gap_dp5);
  static const Widget vGap6 = SizedBox(height: Dimens.gap_dp6);
  static const Widget vGap8 = SizedBox(height: Dimens.gap_dp8);
  static const Widget vGap10 = SizedBox(height: Dimens.gap_dp10);
  static const Widget vGap12 = SizedBox(height: Dimens.gap_dp12);
  static const Widget vGap15 = SizedBox(height: Dimens.gap_dp15);
  static const Widget vGap16 = SizedBox(height: Dimens.gap_dp16);
  static Widget vGap20 = SizedBox(height: Dimens.gap_dp20);
  static Widget vwGap20 = SizedBox(height: 20.w);
  static Widget vGap24 = SizedBox(height: 24.h);
  static Widget vwGap100 = SizedBox(height: 100.w);
  static Widget v_w_Gap24 = SizedBox(height: 24.w);
  static Widget vwGap18 = SizedBox(height: 18.w);
  static Widget wwGap8 = SizedBox(width: 8.w);
  static Widget vwGap8 = SizedBox(height: 8.w);

  static const Widget vGap32 = SizedBox(height: Dimens.gap_dp32);
  static const Widget vGap46 = SizedBox(height: Dimens.gap_dp46);
  static const Widget vGap50 = SizedBox(height: Dimens.gap_dp50);
  static const Widget vGap60 = SizedBox(height: Dimens.gap_dp60);
  static const Widget vGap65 = SizedBox(height: Dimens.gap_dp65);
  static Widget vGap134 = SizedBox(height: Dimens.gap_dp_h_134);

  static Widget vGap44 = SizedBox(height: 44.h);

  static Widget vGap33 = SizedBox(height: 44.h);

  static Widget v_w_Gap30 = SizedBox(height: 30.w);

  static const Widget line = Divider(color: Colours.default_line, height: 0.6);

  static const Widget vLine = SizedBox(
    width: 0.6,
    height: 24.0,
    child: VerticalDivider(width: 0.6),
  );

  static const Widget empty = SizedBox.shrink();
}

// ------------------垂直间隔-------------------------

Widget gapH8 = SizedBox(height: 8.w);

Widget get gapH18 => SizedBox(height: 18.w);

Widget get gapH16 => SizedBox(height: 16.w);

Widget get gapH21 => SizedBox(height: 21.w);

Widget get gapH24 => SizedBox(height: 24.w);

Widget get gapH25 => SizedBox(height: 25.w);

Widget get gapH36 => SizedBox(height: 36.w);

Widget get gapH40 => SizedBox(height: 40.w);

Widget get gapH46 => SizedBox(height: 46.w);

Widget get gapH60 => SizedBox(height: 60.w);

Widget get gapH100 => SizedBox(height: 100.w);

// ------------------水平间隔-------------------------

Widget get gapW8 => SizedBox(width: 8.w);

Widget get gapW10 => SizedBox(width: 10.w);

Widget get gapW14 => SizedBox(width: 14.w);

Widget get gapW16 => SizedBox(width: 16.w);

Widget get gapW15 => SizedBox(width: 15.w);

Widget get gapW18 => SizedBox(width: 18.w);

Widget get gapW24 => SizedBox(width: 24.w);

Widget get gapW25 => SizedBox(width: 25.w);

Widget get gapW36 => SizedBox(width: 36.w);

Widget get gapW48 => SizedBox(width: 48.w);

Widget get gapW50 => SizedBox(width: 50.w);

// -------------------占位符----------------------

Widget get gapZero => const SizedBox.shrink();
